home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / vbtime1a / idd_main.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1999-09-21  |  2.6 KB  |  89 lines

  1. VERSION 5.00
  2. Object = "{1B0C6C74-5F0E-11D3-8CCB-0060088EC467}#9.0#0"; "TimerControl.ocx"
  3. Begin VB.Form IDD_Main 
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "Main"
  6.    ClientHeight    =   1695
  7.    ClientLeft      =   45
  8.    ClientTop       =   330
  9.    ClientWidth     =   3315
  10.    LinkTopic       =   "Form1"
  11.    MaxButton       =   0   'False
  12.    MinButton       =   0   'False
  13.    ScaleHeight     =   1695
  14.    ScaleWidth      =   3315
  15.    StartUpPosition =   2  'CenterScreen
  16.    Begin VB.TextBox Text2 
  17.       Height          =   285
  18.       Left            =   1920
  19.       TabIndex        =   2
  20.       Text            =   "1000"
  21.       Top             =   1080
  22.       Width           =   975
  23.    End
  24.    Begin VB.TextBox Text1 
  25.       Height          =   285
  26.       Left            =   240
  27.       TabIndex        =   1
  28.       Top             =   1080
  29.       Width           =   1455
  30.    End
  31.    Begin VB.CommandButton Command1 
  32.       Caption         =   "Start"
  33.       Height          =   495
  34.       Left            =   240
  35.       TabIndex        =   0
  36.       Top             =   120
  37.       Width           =   1455
  38.    End
  39.    Begin TimerControl.Timer Timer1 
  40.       Left            =   2400
  41.       Top             =   120
  42.       _ExtentX        =   741
  43.       _ExtentY        =   741
  44.       Interval        =   1000
  45.    End
  46.    Begin VB.Label Label2 
  47.       AutoSize        =   -1  'True
  48.       Caption         =   "Timer Interval"
  49.       Height          =   195
  50.       Left            =   1920
  51.       TabIndex        =   4
  52.       Top             =   840
  53.       Width           =   960
  54.    End
  55.    Begin VB.Label Label1 
  56.       AutoSize        =   -1  'True
  57.       Caption         =   "Time at Last Poll"
  58.       Height          =   195
  59.       Left            =   240
  60.       TabIndex        =   3
  61.       Top             =   840
  62.       Width           =   1170
  63.    End
  64. Attribute VB_Name = "IDD_Main"
  65. Attribute VB_GlobalNameSpace = False
  66. Attribute VB_Creatable = False
  67. Attribute VB_PredeclaredId = True
  68. Attribute VB_Exposed = False
  69. Private Sub Command1_Click()
  70.     Timer1.Interval = CLng(Text2)
  71.     Timer1.Enabled = Not Timer1.Enabled
  72.     If Command1.Caption = "Start" Then
  73.         Command1.Caption = "Stop"
  74.     Else
  75.         Command1.Caption = "Start"
  76.     End If
  77. End Sub
  78. Private Sub McTimer1_MVtimer()
  79.     Text1.Text = getTime
  80. End Sub
  81. Private Sub Form_Load()
  82.     Debug.Print "Start:" & Timer1.ProcessPriority
  83.     Timer1.ProcessPriority = RealTime
  84.     Debug.Print "Finish:" & Timer1.ProcessPriority
  85. End Sub
  86. Private Sub Timer1_Timer()
  87.     Text1.Text = getTime
  88. End Sub
  89.